//
//  YSSYVersion.h
//  YSKitExample
//
//  Created by Kyson on 2017/6/16.
//  Copyright © 2017年 YangShen. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface YSAppInfo : NSObject
/// 版本号
@property (nonatomic, copy) NSString *version;
/// 更新日志
@property (nonatomic, copy) NSString *releaseNotes;
/// 更新时间
@property (nonatomic, copy) NSString *currentVersionReleaseDate;
/// AppId
@property (nonatomic, copy) NSString *trackId;
/// bundleId
@property (nonatomic, copy) NSString *bundleId;
/// AppStore地址
@property (nonatomic, copy) NSString *trackViewUrl;
/// App简介
@property (nonatomic, copy) NSString *appDescription;
/// 开发商
@property (nonatomic, copy) NSString *sellerName;
/// 文件大小
@property (nonatomic, copy) NSString *fileSizeBytes;
/// 展示图
@property (nonatomic, copy) NSString *screenshotUrls;

- (instancetype)initWithResult:(NSDictionary *)result;
@end

typedef void(^NewVersionBlock)(YSAppInfo *appInfo);
@interface YSVersion : NSObject

/**
 *  检测新版本(使用默认提示框)
 */
+ (void)checkNewVersion;

/**
 *  检测新版本(自定义提示框)
 *
 *  @param newVersion 新版本信息回调
 */
+ (void)checkNewVersionAndCustomAlert:(NewVersionBlock)newVersion;

@end
